package com.imooc.dianping.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonRes {

    //success或者fail
    private String status;

    private Object data;

    public static CommonRes create(Object data){
        return create(data,"success");
    }

    public static CommonRes create(Object data,String status){
        return new CommonRes(status,data);
    }

}
